﻿<%@ Page Title="كل الفيديوهات" Language="C#" MasterPageFile="~/DMaster.master" AutoEventWireup="true" CodeFile="AllVideos.aspx.cs" Inherits="AllVideos" meta:resourcekey="PageResource1"%>
<%@ Register Src="~/MediaControl.ascx" TagName="MediaControl" TagPrefix="mc" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <%-- <link href="ajaxkit.css" rel="stylesheet" type="text/css" />--%>
  <script type='text/javascript' src='swfobject.js'></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <style type="text/css">
       h3
       {
           	color:#064c66;
	 font-weight:bold;
	 direction:ltr;
	 text-align:left;
           }
   </style>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true">
    <ContentTemplate>
  
    <%--<asp:FormView ID="FormView1" runat="server" BackColor="LightGoldenrodYellow" 
        BorderColor="Tan" BorderWidth="1px" CellPadding="2" ForeColor="Black" 
        DataSourceID="SqlDataSource1" Height="29px" AllowPaging="True"  
            HorizontalAlign="Center" DataKeyNames="id" Width="202px"  >
        <FooterStyle BackColor="Tan" />
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
            HorizontalAlign="Center"  />
            <PagerSettings FirstPageImageUrl="~/icons/btn_page_first.png" LastPageImageUrl="~/icons/btn_page_last.png" NextPageImageUrl="~/icons/btn_page_next.png" PreviousPageImageUrl="~/icons/btn_page_prev.png" FirstPageText="الاولى" LastPageText="الاخير" NextPageText="التالى" PreviousPageText="السابق" Mode="NextPreviousFirstLast" Position="Bottom"/>
            
       
            <ItemTemplate>--%>
           
   <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true">
    <ContentTemplate>--%>
    <br />
           <%-- </ItemTemplate>
        <FooterTemplate >
            <asp:Rating ID="Rating1" runat="server" RatingAlign="Horizontal"   StarCssClass="ratingStar"
                    WaitingStarCssClass="savedRatingStar"
                    FilledStarCssClass="filledRatingStar"
                    EmptyStarCssClass="emptyRatingStar" >
                    
            </asp:Rating>
        </FooterTemplate>
        <HeaderStyle BackColor="Tan" Font-Bold="True" />
        <EditRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
        
    </asp:FormView>--%>
    <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" 
            RepeatColumns="3" CellPadding="5" CellSpacing="5" >
            <ItemTemplate>
           
           
           
          
                   
                     <a href='<%# "ShowMedia.aspx?id=" + Eval("id").ToString() %>'>
                    <asp:Image ID="Image1" runat="server" Height="122px" 
                    ImageUrl='<%# Eval("mtype").ToString()=="2"? Eval("link") :"images/videoplay.jpg" %>' Width="227px" />
                   <br />
                   <asp:Label ID="Label1" runat="server" Text='<%# (Eval("scomment").ToString().Length>=30) ? Eval("scomment").ToString().Substring(0,30)+"..." :Eval("scomment").ToString() %>' />
                   
                   </a>

            </ItemTemplate>
        </asp:DataList>
 
    </ContentTemplate>
    </asp:UpdatePanel>
   
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="SELECT [id], [scomment], [link], [mtype] FROM [media] where mtype=1 order by id desc">
    </asp:SqlDataSource> 
     <br />
     <center>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="<%=Request.Url.AbsoluteUri %>" num_posts="2" width="500"></fb:comments>
</center>

</asp:Content>

